<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<title>装备活动</title>
		<link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/base.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/equipment.css?v=1" />

		<script src="{$staticHost}/static/js/jquery-1.8.3.min.js"></script>
		<script src="{$staticHost}/static/js/js.js"></script>
	</head>
	<body>
		<img class="banner" src="{$staticHost}/static/images/equipment/zbj.png "/>
		<ul class="font-list">
			<li>
				{if $hasWords['hu']}
					<img src="{$staticHost}/static/images/equipment/hu0.png "/>
					<span class="num">X{$hasWords['hu']}</span>
				{else}
					<img src="{$staticHost}/static/images/equipment/hu.png "/>
					<span></span>
				{/if}
			</li>
			<li>
				{if $hasWords['pu']}
					<img src="{$staticHost}/static/images/equipment/pu0.png "/>
					<span class="num">X{$hasWords['pu']}</span>
				{else}
					<img src="{$staticHost}/static/images/equipment/pu.png "/>
					<span></span>
				{/if}
			</li>
			<li>
				{if $hasWords['pao']}
					<img src="{$staticHost}/static/images/equipment/pao0.png "/>
					<span class="num">X{$hasWords['pao']}</span>
				{else}
					<img src="{$staticHost}/static/images/equipment/pao.png "/>
					<span></span>
				{/if}
			</li>
			<li>
				{if $hasWords['bu']}
					<img src="{$staticHost}/static/images/equipment/bu0.png "/>
					<span class="num">X{$hasWords['bu']}</span>
				{else}
					<img src="{$staticHost}/static/images/equipment/bu.png "/>
					<span></span>
				{/if}
			</li>
		</ul>
		<ul class="font-list">
			<li>
				{if $hasWords['zhuang']}
					<img src="{$staticHost}/static/images/equipment/zhuang0.png "/>
					<span class="num">X{$hasWords['zhuang']}</span>
				{else}
					<img src="{$staticHost}/static/images/equipment/zhuang.png "/>
					<span></span>
				{/if}
			</li>
			<li>
				{if $hasWords['bei']}
					<img src="{$staticHost}/static/images/equipment/bei0.png "/>
					<span class="num">X{$hasWords['bei']}</span>
				{else}
					<img src="{$staticHost}/static/images/equipment/bei.png "/>
					<span></span>
				{/if}
			</li>
			<li>
				{if $hasWords['jie']}
					<img src="{$staticHost}/static/images/equipment/jie0.png "/>
					<span class="num">X{$hasWords['jie']}</span>
				{else}
					<img src="{$staticHost}/static/images/equipment/jie.png "/>
					<span></span>
				{/if}
			</li>			
		</ul>
		<!-- 虎扑跑步 -->
		<section class="a-list">
			{if $drawStatus == 0}
				<a href="javascript:;" id="cgz"><img src="{$staticHost}/static/images/equipment/cgz.png "/></a>
				<a class="gray" href="javascript:;"><img src="{$staticHost}/static/images/equipment/fx.png "/></a>
				
			{/if}
			{if $drawStatus == 1}
				<a class="gray" href="javascript:;"><img src="{$staticHost}/static/images/equipment/mtc.png "/></a>
				<a href="javascript:;" id="fx"><img src="{$staticHost}/static/images/equipment/fx.png "/></a>
			{/if}
			{if $drawStatus == 2}
				<a class="gray" href="javascript:;"><img src="{$staticHost}/static/images/equipment/mtc.png "/></a>
				<a href="javascript:;" id="zcgz"><img src="{$staticHost}/static/images/equipment/cgz.png "/></a>
			{/if}
			{if $drawStatus == 3}
				<a class="gray" href="javascript:;"><img src="{$staticHost}/static/images/equipment/mtc.png "/></a>
				<a class="gray" href="javascript:;"><img src="{$staticHost}/static/images/equipment/mtf.png "/></a>
			{/if}
		</section>
		<!-- 抽字按钮 -->
		<ul class="award-box">
			<li id="iphone">
				<img src="{$staticHost}/static/images/equipment/iphone.png "/>
				<span>
					<img src="{$staticHost}/static/images/equipment/pls.png "/>
					<i {if in_array(11,$hasPrizes)}class="unlock"{else}class="lock"{/if}></i>
				</span>
				<p><small>集齐</small>虎扑跑步装备节</p>
			</li>
		
			<li id="xz">
				<img src="{$staticHost}/static/images/equipment/xz.png "/>
				<span>
					<img src="{$staticHost}/static/images/equipment/xdpx.png "/>
					<i {if in_array(12,$hasPrizes)}class="unlock"{else}class="lock"{/if}></i>
				</span>
				<p><small>集齐</small>虎扑跑步</p>
			</li>
			
			<li id="quan">
				<img src="{$staticHost}/static/images/equipment/quan.png "/>
				<span>
					<img src="{$staticHost}/static/images/equipment/sc.png "/>
					<i {if in_array(13,$hasPrizes)}class="unlock"{else}class="lock"{/if}></i>
				</span>
				<p><small>集齐</small>装备节</p>
			</li>
		<!--奖品箱子 -->
		</ul>
		<p class="sm">活动说明</p>
		<div class="over">
			活动已结束
		</div>
		<div class="mask" style="display:none;">
			<section class="box">
				<h1>
					<img class="smpng" src="{$staticHost}/static/images/equipment/sm.png "/>
					<img class="zjpng" src="{$staticHost}/static/images/equipment/zj.png "/>
				</h1>
				<span class="close"></span>

				<div class="info-tk" >
					<p>
					   恭喜集齐“<span id="zz"></span>”
						<span class="db" id="jp"></span>
						请填写信息
					</p>
					<ul class="input-list">
						<li>
							<span>姓名</span>
							<input type="text" name="name" id="name">
						</li>
						<li>
							<span>电话</span>
							<input type="text" name="phone" id="phone">
						</li>
						<li>
							<span>地址</span>
							<input type="text" name="address" id="address">
						</li>
						<li>
							<span>尺码</span>
							<input type="text" name="size" id="size">
						</li>
					</ul>
					<span class="green-btn" >
						<img id="tj" src="{$staticHost}/static/images/equipment/tj.png "/>
					</span>
				</div>

				<!-- 录入信息 -->
				<dl class="text" >
					<dt>活动时间：2016.9.28-2016.10.7</dt>
					<dt>活动规则：</dt>
					<dd>
						1.活动期间内集字获得装备：<br/>
						集齐<b>“虎扑跑步装备节”</b>获得iPhone7 plus<br/>
						集齐<b>“虎扑跑步”</b>获得品牌跑鞋<br/>
						集齐<b>“装备节”</b>获得虎扑跑步商城5元抵用券
					<dd>

					<dd>
						2.每天可进入页面抽取一个字，同时每天可
						分享至朋友圈以后再抽取一个字。一天最多
						抽取2个字。
					<dd>
					<dt>活动奖品：</dt>
					<dd>
						iPhone 7 Plus （32G）<br/>
						索康尼“北京”限定款跑鞋<br/>
						虎扑跑步商城5元抵用券
					<dd>

					<dd>本活动最终解释权归虎扑跑步所有<dd>
				</dl> 
				<div class="lq-tk">
					<p class="gx f15 ac">
						恭喜集齐“装备节”获得<br/>
						虎扑跑步商城5元抵用券
						<span class="db f18 mtb10">抵用券代码：hupupb</span>
						<small class="db">使用有效期至2016.10.09</small>
					</p>
					<span class="green-btn" >
						<img id="lq" src="{$staticHost}/static/images/equipment/lq.png "/>
						<img style="display: none;" id="ljsy" src="{$staticHost}/static/images/equipment/ljsy.png "/>
					</span>
					
				</div>
			</section>
		</div>

	

<script type="text/javascript">
	$(".smpng").hide();
	$(".zjpng").show();
	$(".close").click(function(){
		$(".mask").hide()
		$(".text").hide();
		$(".lq-tk").hide()
		$(".info-tk").hide()
	})

	$(".sm").click(function(){
		
		$(".mask").show()
		$(".text").show();
		$(".lq-tk").hide()
		$(".info-tk").hide()
		$(".zjpng").hide();
		$(".smpng").show();
	})

	$("#{if $isPrizeClick == 1}iphone{elseif $isPrizeClick == 2}xz{elseif $isPrizeClick == 3}quan{/if}").click(function(){
		{if $isPrizeClick == 1}var zz = '虎扑跑步装备节', jp = 'iPhone7 Plus 一部';{elseif $isPrizeClick == 2}var zz = '虎扑跑步', jp = '索康尼“北京”限定款跑鞋';{elseif $isPrizeClick == 3}var zz = '装备节', jp = '虎扑跑步商城5元抵用券';{/if}
		
		$('#zz').text(zz);
		$('#jp').text(jp);
		$(".mask").show();
		{if $isPrizeClick == 3}
		$(".info-tk").hide();
		$(".lq-tk").show();
		{else}
		$(".info-tk").show();
		$(".lq-tk").hide();
		{/if}
		$(".text").hide();
		$("smpng").hide();
		$("zjpng").show();

	});
	$("#quan .unlock").addClass("ylq")

	$(".ylq").parent().parent().click(function(){
		$(".smpng").hide();
		$(".zjpng").show();
		$('#zz').text("装备节");
		$('#jp').text("虎扑跑步商城5元抵用券");
		$(".mask").show();
		$("#lq").hide()
		$("#ljsy").show()
		$(".info-tk").hide();
		$(".lq-tk").show();
		$(".text").hide();
	})
	$("#ljsy").click(function(){
		window.location.href='https://h5.koudaitong.com/v2/showcase/homepage?alias=rxxwwmb5';
	})

	if({$isPrizeClick} == 3){
		$('#zz').text("装备节");
		$('#jp').text("虎扑跑步商城5元抵用券");
		$(".mask").show();

		$(".info-tk").hide();
		$(".lq-tk").show();
		$(".text").hide();

		$(".smpng").hide();
		$(".zjpng").show();
	}

	if({$isPrizeClick} == 2){
		$('#zz').text("虎扑跑步");
		$('#jp').text("索康尼“北京”限定款跑鞋");
		$(".mask").show();

		$(".info-tk").show();
		$(".lq-tk").hide();
		$(".text").hide();
		$(".smpng").hide();
		$(".zjpng").show();
	}

	if({$isPrizeClick} == 1){
		$('#zz').text("虎扑跑步装备节");
		$('#jp').text("iPhone7 Plus 一部");
		$(".mask").show();

		$(".info-tk").show();
		$(".lq-tk").hide();
		$(".text").hide();
		$(".smpng").hide();
		$(".zjpng").show();
	}



	var cgzStatus = true, fxStatus = true, zcgzStatus = true;

	$(function(){
		$('#cgz').on('click', function(){
			if(!cgzStatus) {
				return;
			}

			cgzStatus = false;
			$(".over").show();
			setTimeout(function(){
    			$(".over").hide();
    		},1000);
			// $.post('/show/isDraw', {'operation': 1}, function(data) {
			// 	$.post('/show/EquipmentDraw', {}, function(data) {
			// 		if(data) {
			// 			window.location.reload()
			// 		} else {
			// 			alert('遇到点问题，请稍后再试...');
			// 		}
			// 		cgzStatus = true;
			// 	});
			// });
		});

		$('#fx').on('click', function(){
			if(!fxStatus) {
				return;
			}

			fxStatus = false;
			$(".over").show();
			setTimeout(function(){
    			$(".over").hide();
    		},1000);

			// $.post('/show/isDraw', {'operation': 2}, function(data) {

			// 	if(typeof jw == "object") {
			//         jw.api('share_button', JSON.stringify({'status': true}));
			//         jw.api('set_share_info', JSON.stringify({
			//           'title': '集字赢取装备，中奖率100%',
			//           'description': '虎扑跑步装备节，装备免费送！',
			//           //'img_url': 'http://irun.hupu.com/static/images/mid-autumn/fxjt.jpg',
			//           'link_url': '{$staticHost}/show/EquipmentShare'
			//         }));
			//         jw.api('share', JSON.stringify({'channel': 'weixin_side'}));
			//       }

			// 	window.location.reload();
			// 	fxStatus = true;
			// });
		});

		$('#zcgz').on('click', function(){
			if(!zcgzStatus) {
				return;
			}
			$(".over").show();
			setTimeout(function(){
    			$(".over").hide();
    		},1000);
			// zcgzStatus = false;

			// $.post('/show/isDraw', {'operation': 3}, function(data) {
			// 	$.post('/show/EquipmentDraw', {}, function(data) {
			// 		if(data) {
			// 			window.location.reload()
			// 		} else {
			// 			alert('遇到点问题，请稍后再试...');
			// 		}
			// 		zcgzStatus = true;
			// 	});
			// });
		});
		$('#lq').on('click', function(){
			$.post('/show/saveEquipment', {'prize': 13}, function(data){
				if(data) {
					$('#quan i').removeClass('lock').addClass('unlock');
					window.location.href='https://h5.koudaitong.com/v2/showcase/homepage?alias=rxxwwmb5';

				} else {
					alert('遇到点问题，请稍后再试...');
				}
			})
		});

		$('#tj').on('click', function(){
			var name = $('#name').val();
			var phone = $('#phone').val();
			var address = $('#address').val();
			var size = $('#size').val();
			$.post('/show/saveEquipment', {'prize': 12, 'name': name, 'phone': phone, 'address': address, 'size': size}, function(data){
				data = JSON.parse(data);

				if(data.error) {
					alert(data.error.text);
					return;
				}

				if(data.result !== undefined && data.result.wid !== undefined) {
					window.location.reload()
				} else {
					alert('遇到点问题，请稍后再试...');
				}
			})
		});
	});
</script>


{template 'show/web-footer'}
